package com.lemo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import com.lemo.model.Provider;

@Service
public class RibbonService {
	
	
	@Autowired
    private RestTemplate restTemplate;

    public Provider findById(Long id) {
        // http://服务提供者的serviceId/url
        return this.restTemplate.getForObject("http://lemo-microservice-eureka-provider/1", Provider.class);
    }
}	
